package com.haochen.gateway.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhangquancheng
 * @Description: 测试获取 配置属性热更新controller
 */
@RestController
@RefreshScope
public class TestController {
    @Value("${test.aaa}")
    private int aaa;

    @RequestMapping(method = RequestMethod.GET,path = "/getAaa")
    public int getAaa(){
        return aaa;
    }
}
